<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ComprovanteEntregaCreateDlg" widgetVar="ComprovanteEntregaCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateComprovanteEntregaTitle}">
            <h:form id="ComprovanteEntregaCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{comprovanteEntregaController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_idComprovanteEntrega}" for="idComprovanteEntrega" />
                        <p:inputText id="idComprovanteEntrega" value="#{comprovanteEntregaController.selected.idComprovanteEntrega}" title="#{bundle.CreateComprovanteEntregaTitle_idComprovanteEntrega}" required="true" requiredMessage="#{bundle.CreateComprovanteEntregaRequiredMessage_idComprovanteEntrega}"/>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_nuComprovanteEntrega}" for="nuComprovanteEntrega" />
                        <p:inputText id="nuComprovanteEntrega" value="#{comprovanteEntregaController.selected.nuComprovanteEntrega}" title="#{bundle.CreateComprovanteEntregaTitle_nuComprovanteEntrega}" required="true" requiredMessage="#{bundle.CreateComprovanteEntregaRequiredMessage_nuComprovanteEntrega}"/>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_dtComprovanteEntrega}" for="dtComprovanteEntrega" />
                        <p:calendar id="dtComprovanteEntrega" pattern="MM/dd/yyyy" value="#{comprovanteEntregaController.selected.dtComprovanteEntrega}" title="#{bundle.EditComprovanteEntregaTitle_dtComprovanteEntrega}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_qtMedidorFim}" for="qtMedidorFim" />
                        <p:inputText id="qtMedidorFim" value="#{comprovanteEntregaController.selected.qtMedidorFim}" title="#{bundle.CreateComprovanteEntregaTitle_qtMedidorFim}" />
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_qtMedidorInicio}" for="qtMedidorInicio" />
                        <p:inputText id="qtMedidorInicio" value="#{comprovanteEntregaController.selected.qtMedidorInicio}" title="#{bundle.CreateComprovanteEntregaTitle_qtMedidorInicio}" />
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_nuIsm}" for="nuIsm" />
                        <p:inputText id="nuIsm" value="#{comprovanteEntregaController.selected.nuIsm}" title="#{bundle.CreateComprovanteEntregaTitle_nuIsm}" />
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_nuCartao}" for="nuCartao" />
                        <p:inputText id="nuCartao" value="#{comprovanteEntregaController.selected.nuCartao}" title="#{bundle.CreateComprovanteEntregaTitle_nuCartao}" />
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_hrInicio}" for="hrInicio" />
                        <p:calendar id="hrInicio" pattern="HH:mm:ss" value="#{comprovanteEntregaController.selected.hrInicio}" title="#{bundle.EditComprovanteEntregaTitle_hrInicio}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_hrFim}" for="hrFim" />
                        <p:calendar id="hrFim" pattern="HH:mm:ss" value="#{comprovanteEntregaController.selected.hrFim}" title="#{bundle.EditComprovanteEntregaTitle_hrFim}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_inSituacao}" for="inSituacao" />
                        <p:inputText id="inSituacao" value="#{comprovanteEntregaController.selected.inSituacao}" title="#{bundle.CreateComprovanteEntregaTitle_inSituacao}" />
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_codAeroporto}" for="codAeroporto" />
                        <p:selectOneMenu id="codAeroporto" value="#{comprovanteEntregaController.selected.codAeroporto}" required="true" requiredMessage="#{bundle.EditComprovanteEntregaRequiredMessage_codAeroporto}">
                            <f:selectItems value="#{aeroportoController.itemsAvailableSelectOne}"
                                           var="codAeroportoItem"
                                           itemValue="#{codAeroportoItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_codContrato}" for="codContrato" />
                        <p:selectOneMenu id="codContrato" value="#{comprovanteEntregaController.selected.codContrato}" required="true" requiredMessage="#{bundle.EditComprovanteEntregaRequiredMessage_codContrato}">
                            <f:selectItems value="#{contratoController.itemsAvailableSelectOne}"
                                           var="codContratoItem"
                                           itemValue="#{codContratoItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_codDocumentoFiscal}" for="codDocumentoFiscal" />
                        <p:selectOneMenu id="codDocumentoFiscal" value="#{comprovanteEntregaController.selected.codDocumentoFiscal}" >
                            <f:selectItems value="#{documentoFiscalController.itemsAvailableSelectOne}"
                                           var="codDocumentoFiscalItem"
                                           itemValue="#{codDocumentoFiscalItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_codUsuarioCadastrador}" for="codUsuarioCadastrador" />
                        <p:selectOneMenu id="codUsuarioCadastrador" value="#{comprovanteEntregaController.selected.codUsuarioCadastrador}" required="true" requiredMessage="#{bundle.EditComprovanteEntregaRequiredMessage_codUsuarioCadastrador}">
                            <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"
                                           var="codUsuarioCadastradorItem"
                                           itemValue="#{codUsuarioCadastradorItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateComprovanteEntregaLabel_codVeiculo}" for="codVeiculo" />
                        <p:selectOneMenu id="codVeiculo" value="#{comprovanteEntregaController.selected.codVeiculo}" required="true" requiredMessage="#{bundle.EditComprovanteEntregaRequiredMessage_codVeiculo}">
                            <f:selectItems value="#{aeronaveController.itemsAvailableSelectOne}"
                                           var="codVeiculoItem"
                                           itemValue="#{codVeiculoItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{comprovanteEntregaController.create}" value="#{bundle.Save}" update="display,:ComprovanteEntregaListForm:datalist,:growl" oncomplete="handleSubmit(args,'ComprovanteEntregaCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ComprovanteEntregaCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
